const webpack = require('webpack');
const merge = require('webpack-merge');  // concatenates arrays
const config = require('./webpack.base.conf.js');

module.exports = merge(config,{
    devtool: 'inline-source-map',
    devServer: {
        contentBase: './src',
        host: 'localhost',
        port: 9090,
        inline: true, //可以监控js变化
        hot: true, //热启动
    },
    plugins: [
        // 查看要修补(patch)的依赖
        new webpack.NamedModulesPlugin(),
        // 热加载
        new webpack.HotModuleReplacementPlugin()
    ]
});